// 常用工具及Api菜单配置

import { BrowserWindow, MenuItemConstructorOptions } from 'electron';
export const TOOLS_MENU: Array<MenuItemConstructorOptions> = [
  {
    label: 'Ai',
    submenu: [
      {
        label: '通义千问-智能问答&检索&文案创作',
        accelerator: 'ctrl + F1',
        click(item: any, win: any, evt: any) {
          console.log(item, win, evt);
          const currentWindow = BrowserWindow.getFocusedWindow();
          const url = 'https://tongyi.aliyun.com/qianwen/';
          currentWindow.loadURL(`${url}`);
        }
      },
      {
        label: '星火-对话写作&教育&语音交互',
        accelerator: 'ctrl + F2',
        click() {
          const currentWindow = BrowserWindow.getFocusedWindow();
          const url = 'https://xinghuo.xfyun.cn/desk';
          currentWindow.loadURL(`${url}`);
        }
      },
      {
        label: '豆包-视频图像&营销策划',
        accelerator: 'ctrl + F3',
        click() {
          const currentWindow = BrowserWindow.getFocusedWindow();
          const url = 'https://www.doubao.com';
          currentWindow.loadURL(`${url}`);
        }
      },
      {
        label: '智普清言-商业分析&决策辅助&客户服务',
        accelerator: 'ctrl + F4',
        click() {
          const currentWindow = BrowserWindow.getFocusedWindow();
          const url = 'https://chatglm.cn/main/alltoolsdetail?lang=zh';
          currentWindow.loadURL(`${url}`);
        }
      },
      {
        label: 'Kimi-处理长文本',
        accelerator: 'ctrl + F5',
        click() {
          const currentWindow = BrowserWindow.getFocusedWindow();
          const url = 'https://kimi.moonshot.cn';
          currentWindow.loadURL(`${url}`);
        }
      },
      {
        label: 'DeepSeek-线上编程助手',
        accelerator: 'ctrl + F6',
        click() {
          const currentWindow = BrowserWindow.getFocusedWindow();
          const url = 'https://chat.deepseek.com';
          currentWindow.loadURL(`${url}`);
        }
      },
      {
        label: '阿川AI',
        accelerator: 'ctrl + F7',
        click() {
          const currentWindow = BrowserWindow.getFocusedWindow();
          const url = 'https://www.achuanai.com/chat';
          currentWindow.loadURL(`${url}`);
        }
      }
    ]
  },
  {
    label: 'Tools',
    submenu: [
      {
        label: '在线工具箱-1',
        accelerator: 'ctrl + F8',
        click() {
          const currentWindow = BrowserWindow.getFocusedWindow();
          const url = 'https://www.toolfk.com/zh-cn';
          currentWindow.loadURL(`${url}`);
        }
      },
      {
        label: '在线工具箱-2',
        accelerator: 'ctrl + F8',
        click() {
          const currentWindow = BrowserWindow.getFocusedWindow();
          const url = 'https://www.toolhelper.cn';
          currentWindow.loadURL(`${url}`);
        }
      },
      {
        label: '在线流程图设计',
        accelerator: 'ctrl + F10',
        click() {
          const currentWindow = BrowserWindow.getFocusedWindow();
          const url = 'https://app.diagrams.net';
          currentWindow.loadURL(`${url}`);
        }
      },
      {
        label: '正则表达式',
        accelerator: 'ctrl + F11',
        click() {
          const currentWindow = BrowserWindow.getFocusedWindow();
          const url = 'https://regex101.com';
          currentWindow.loadURL(`${url}`);
        }
      },
      {
        label: '谷歌浏览器插件',
        accelerator: 'ctrl + F12',
        click() {
          const currentWindow = BrowserWindow.getFocusedWindow();
          const url = 'https://chrome.pictureknow.com';
          currentWindow.loadURL(`${url}`);
        }
      },
      {
        label: '屏幕尺寸大全',
        accelerator: 'ctrl + A',
        click() {
          const currentWindow = BrowserWindow.getFocusedWindow();
          const url = 'https://www.strerr.com/screen.html';
          currentWindow.loadURL(`${url}`);
        }
      },
      {
        label: 'Element Plus',
        accelerator: 'ctrl + B',
        click() {
          const currentWindow = BrowserWindow.getFocusedWindow();
          const url = 'https://element-plus.org/zh-CN/component/overview.html';
          currentWindow.loadURL(`${url}`);
        }
      },
      {
        label: '腾讯在线文档',
        accelerator: 'ctrl + C',
        click() {
          const currentWindow = BrowserWindow.getFocusedWindow();
          const url = 'https://docs.qq.com/desktop';
          currentWindow.loadURL(`${url}`);
        }
      }
    ]
  },
  {
    label: 'Citc',
    submenu: [
      {
        label: 'Codes-项目管理',
        accelerator: 'ctrl + D',
        click() {
          const currentWindow = BrowserWindow.getFocusedWindow();
          const url = 'http://43.136.167.92:8010/codes';
          currentWindow.loadURL(`${url}`);
        }
      },
      {
        label: 'GitLab-代码管理',
        accelerator: 'ctrl + E',
        click() {
          const currentWindow = BrowserWindow.getFocusedWindow();
          const url = 'http://192.168.66.172:86/users/sign_in';
          currentWindow.loadURL(`${url}`);
        }
      },
      {
        label: 'Codesign-UI设计',
        accelerator: 'ctrl + F',
        click() {
          const currentWindow = BrowserWindow.getFocusedWindow();
          const url = 'https://codesign.qq.com/app/design?team_id=408600131667115';
          currentWindow.loadURL(`${url}`);
        }
      }
    ]
  },
  {
    label: 'View',
    role: 'viewMenu'
  },
  {
    label: 'Window',
    role: 'windowMenu'
  },
  {
    label: 'VueExample',
    accelerator: 'ctrl + G',
    submenu: [
      {
        label: 'home',
        click() {
          const currentWindow = BrowserWindow.getFocusedWindow();
          // FIXME:目前使用因代码处理
          const url = `http://127.0.0.1:24000/#/home`;
          currentWindow.loadURL(`${url}`);
        }
      },
      {
        label: '404',
        click() {
          const currentWindow = BrowserWindow.getFocusedWindow();
          const url = 'http://127.0.0.1:24000/#/notFound';
          currentWindow.loadURL(`${url}`);
        }
      }
    ]
  },
  {
    label: 'PersonalBlog',
    accelerator: 'ctrl + H',
    click() {
      const currentWindow = BrowserWindow.getFocusedWindow();
      const url = 'https://doc.mostrip.cn/';
      currentWindow.loadURL(`${url}`);
    }
  }
];
